package com.hairline.hairlinemarket.shiro;

import org.apache.shiro.authc.pam.ModularRealmAuthenticator;
import org.apache.shiro.realm.Realm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Collection;

/**
 * @author stone
 * @date 2023/04/21 11:29
 */
//@Component
public class WdAuthenticator extends ModularRealmAuthenticator {
    // 自己提供的认证器 → realms为空
    @Autowired
    public void setWdRealm(WdRealm wdRealm){
        super.setRealms(Arrays.asList(wdRealm));
    }
}
